<?php
global $php;

if (isset($php->config['mysql'][$php->factory_key]))
{
    $config = $php->config['mysql'][$php->factory_key];

    if (empty($config['port']))
        $config['port'] = 3306;


    return new Tiger\Component\Mysql($config);
}
else
{
    throw new Exception('require mysql[' . $php->factory_key . '] config.');
}

